home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Software Contest 3
/
FM Towns Software Contest 3.iso
/
exp
/
video_t
/
no1
/
c_sorse
/
gmn2.c
< prev
next >
Wrap
Text File
|
1994-01-07
|
3KB
|
123 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
extern int backid ;
extern int Dia_edit ;
extern int Dialog_menu ;
extern int Text ;
int Dialog_gamen = -1 ;
int TIcon_g[4] = -1 ;
int Message_gamen = -1 ;
int Message_32000 = -1 ;
int Message_32 = -1 ;
int Message_256 = -1 ;
int DButton_gamen_on = -1 ;
int DButton_gamen_off = -1 ;
int Message_gamen_on = -1 ;
int Message_gamen_off = -1 ;
int Message_16 = -1 ;
int radioAlterFlag = 0 ;
/* initDataGMN:TIcon_g[0]:MJ_TICONL40の呼び出し関数 */
/* initDataGMN:TIcon_g[1]:MJ_TICONL40の呼び出し関数 */
/* initDataGMN:TIcon_g[2]:MJ_TICONL40の呼び出し関数 */
/* initDataGMN:TIcon_g[3]:MJ_TICONL40の呼び出し関数 */
int gamen_mode(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
/* 現在選択状態にあるボタンを非選択状態にし、選択可にします */
MTL_resetFlagObj(radioAlterFlag,~(MS_UNSELECT | MS_TOGGLE)) ;
MMI_SendMessage(radioAlterFlag, MM_SHOW, 0) ;
/* 画面選択フラグを更新します */
radioAlterFlag = kobj ;
/* 呼び出し元トグルボタンを選択状態にし、選択不可にします */
MTL_setFlagObj(kobj, MS_UNSELECT | MS_TOGGLE) ;
MMI_SendMessage(kobj, MM_SHOW, 0) ;
return NOERR ;
}
/* initDataGMN:DButton_gamen_on:MJ_DBUTTONL40の呼び出し関数 */
int gamen_on(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
int iii;
char comnd[200]="\0";
/* 各設定値の読み取り */
for (iii = 0 ; iii < 4 ; iii++)
{
if (TIcon_g[iii] == radioAlterFlag) break ;
}
if(iii>=4) return -1;
MMI_SendMessage(Dialog_gamen,MM_ERASE,0) ;
MMI_SendMessage(Dialog_gamen,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
switch (iii)
{
case 0: strcat(comnd,"/GMODE 1"); break;
case 1: strcat(comnd,"/GMODE 6"); break;
case 2: strcat(comnd,"/GMODE 0"); break;
case 3: strcat(comnd,"/GMODE 2"); break;
default: iii=10;
}
if(iii != 10)
{
MMI_SendMessage(Text,MM_SETTEXT,3,comnd,200,TRUE) ;
MMI_SendMessage(Text,MM_SETTEXT,3,"\n",5,TRUE) ;
}
MMI_SendMessage(Text, MM_ERASE, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
return NOERR ;
}
/* initDataGMN:DButton_gamen_off:MJ_DBUTTONL40の呼び出し関数 */
int gamen_off(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
MMI_SendMessage(Dialog_gamen,MM_ERASE,0) ;
MMI_SendMessage(Dialog_gamen,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
int l_gamen()
{
/* 背景を選択不可とします。*/
MTL_setAtrObj(backid, MS_DSPONLYL40) ;
MTL_setAtrObj(Dialog_menu, MS_DSPONLYL40) ;
MTL_setAtrObj(Dia_edit, MS_DSPONLYL40) ;
MMI_SendMessage(Dialog_gamen,MM_ATTACH,1,MMI_GetBaseObj()) ;
MMI_SendMessage(Dialog_gamen, MM_SHOW, 0) ;
return NOERR ;
}